package imagetoolscommon;

public class Point {

	private double x;
	private double y;
	
	public double getX() {
		return x;
	}
	public double getY() {
		return y;
	}
	public void setX(double x) {
		this.x = x;
	}
	public void setY(double y) {
		this.y = y;
	}
	
	public Point(){
		
	}
	
	public Point(double x, double y) {
		super();
		this.x = x;
		this.y = y;
	}
	
	public void round()
    {
        this.x = Math.round(this.x);
        this.y = Math.round(this.y);
    }
	
	 public void floor()
     {
         this.x = Math.floor(this.x);
         this.y = Math.floor(this.y);
     }
	
	public Point divide(double factor)
    {
        return new Point(this.x / factor, this.y / factor);
    }
	
	public Point multiply(double factor)
    {
        return new Point(this.x * factor, this.y * factor);
    }
	
	
	@Override
	public String toString() {
		return "Point [x=" + (int)x + ", y=" + (int)y + "]";
	}
	
}
